<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<script>
			
			function quc(arr) {
				var i, len = arr.length,j;
				for(i = 0 ; i < len ; i++){
				    
				    for(j = i+1 ; j < len ; j++){
				        if(arr[i] == arr[j]){//如果想比较类型用===
				            arr.splice(j,1)
				        };
				    };
				    
				};
				console.log(arr)				
			};
			quc([1,3,4,3,7,9,3,6]);
			
			function shuzu(arr) {
				var obj = {}, i = 0, l = arr.length, k;
				for(i; i < l; i++){
					obj[arr[i]] = arr[i];
					console.log(obj)
				};
				arr.length = 0;
				for(k in obj){
					arr.push(obj[k])
				};
				return arr;
			};
			var r = shuzu([1,3,4,3,4,9,7,11,19,66,3,6]);
			console.log(r)

		</script>
		
		
	</body>
</html>
